package com.blacktry.GATest;

// 学习单元--课程  // 已验
public class Module {
    // 学习单元id
    private final long moduleId;
    // 课程id
    private final String moduleCode;
    // 课程名
    private final String module;
    // 能教授的教师id
    private final long professorIds[];

    public Module(long moduleId,String moduleCode,String module,long professorIds[]){
        this.moduleId = moduleId;
        this.moduleCode = moduleCode;
        this.module = module;
        this.professorIds = professorIds;
    }
    public long getModuleId() {
        return this.moduleId;
    }
    public String getModuleCode() {
        return this.moduleCode;
    }
    public String getModuleName(){
        return this.module;
    }
    public long getRandomProfessorId() {
        // 随机选取教授---后期可改根据时间均匀分配
        long professorId = professorIds[(int) (professorIds.length * Math.random())];
        return professorId;
    }

}
